<template>
	<div>
		<van-row style="width: 100vw;height: 5vh;">
			<van-col span="24"></van-col>
		</van-row>
		<van-row style="width: 100vw;height: 3vh;">
			<van-skeleton
			  :row="1"
			  :loading="loading"
			>
			  <h3 style="text-align: left;padding-left: 10px;">{{values}}.</h3>
			</van-skeleton>
			
		</van-row>
		<van-row style="height: 5vh;">
			<van-col span="21">
				<van-skeleton
				row-width
				  :row="1"
				  :loading="loading"
				>
				  <van-search v-model="value" placeholder="请输入你要搜索的商品" style="line-height: 25px" @click="jump(1)"/>
				  
				</van-skeleton>
				
			</van-col>
			<van-col span="3">
				<van-icon name="chat-o" size="20px" style="margin-top: 1.0625rem"/>
			</van-col>
		</van-row>
	</div>
</template>

<script>
	export default {
	  data() {
	    return {
	      value: '',
		  values: '',
		  loading:true
	    };
	  },
	  created() {
	  	let dates = new Date()
		console.log(dates.getHours())
		 if(dates.getHours()>7&&dates.getHours()<12){
			 this.values ="早上好"
		 }else if(dates.getHours()>13&&dates.getHours()<17){
			 this.values ="下午好"
		 }else{
			 this.values ="晚上好"
		 }
	  },
	  mounted() {
	  	this.loading=false
	  },
	  methods:{
		jump(id){
	        // location.href="/HomeSearch"
			this.$router.push({path:'/HomeSearch'})	
		}  
	  }
	};
</script>

<style>
	.van-search .van-cell{
		line-height: 20px;
	}
</style>
